package cn.iocoder.yudao.module.team.dal.mysql.ordepayment;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.team.dal.dataobject.ordepayment.OrdePaymentDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.team.controller.admin.ordepayment.vo.*;

/**
 * 团款项目 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface OrdePaymentMapper extends BaseMapperX<OrdePaymentDO> {

    default PageResult<OrdePaymentDO> selectPage(OrdePaymentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrdePaymentDO>()
                .eqIfPresent(OrdePaymentDO::getTeamOrdeId, reqVO.getTeamOrdeId())
                .eqIfPresent(OrdePaymentDO::getTeamOrdeNumbers, reqVO.getTeamOrdeNumbers())
                .eqIfPresent(OrdePaymentDO::getType, reqVO.getType())
                .likeIfPresent(OrdePaymentDO::getName, reqVO.getName())
                .eqIfPresent(OrdePaymentDO::getPrice, reqVO.getPrice())
                .eqIfPresent(OrdePaymentDO::getNumber, reqVO.getNumber())
                .eqIfPresent(OrdePaymentDO::getRemark, reqVO.getRemark())
                .eqIfPresent(OrdePaymentDO::getColumn1, reqVO.getColumn1())
                .eqIfPresent(OrdePaymentDO::getColumn2, reqVO.getColumn2())
                .eqIfPresent(OrdePaymentDO::getColumn3, reqVO.getColumn3())
                .eqIfPresent(OrdePaymentDO::getColumn4, reqVO.getColumn4())
                .eqIfPresent(OrdePaymentDO::getColumn5, reqVO.getColumn5())
                .orderByAsc(OrdePaymentDO::getId));
    }

}